/*
 * @Author: sunli
 * @Date: 2024-01-30 13:43:00
 * @LastEditors: sunli
 * @LastEditTime: 2024-02-28 14:54:22
 * @FilePath: /debug/src/router.js
 * @Description: 
 */
import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('./views/home/index.vue')
  },
  {
    path: '/operation',
    name: 'Operation',
    component: () => import('./views/operation/index.vue'),
    children: [
      {
        path: '/operation/project',
        name: 'Project',
        component: () => import('./views/operation/project.vue')
      },
      {
        path: '/operation/project-add',
        name: 'ProjectAdd',
        component: () => import('./views/operation/project-add.vue')
      },
      {
        path: '/operation/project-detail',
        name: 'ProjectDetail',
        component: () => import('./views/operation/project-detail.vue')
      },
      {
        path: '/operation/person',
        name: 'Person',
        component: () => import('./views/operation/person.vue')
      }
    ]
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('./views/login/register.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('./views/login/login.vue')
  },
  {
    path: '/modify',
    name: 'Modify',
    component: () => import('./views/login/modify.vue')
  },
  {
    path: '/errorDetail',
    name: 'errorDetail',
    component: () => import('./views/errorDetail/index.vue')
  },
  {
    path: '/operation/echarts',
    name: 'echarts',
    component: () => import('./views/operation/echarts.vue')
  }
]

const instance = createRouter({
  history: createWebHashHistory(),
  routes
})


export default instance